package redtankface.tasks;

import redtankface.RedTankFace;
import redtankface.TankTask;

public class FullScanTask extends TankTask {
    private static final double FULL_SCAN_COEFITIENT = 0.02;

    public FullScanTask(RedTankFace aRobot) {
        super(aRobot);
    }

    @Override
    public long getRating() {
        return (long)(25 + FULL_SCAN_COEFITIENT * (mRobot.getLastDetect()
                - mRobot.getLastDetect()) * (mRobot.getLastDetect() - mRobot.getLastDetect()));
    }

    @Override
    public void p_doTask() {
        mRobot.turnRadarRight(360);
    }
}
